The present invention relates generally to data object types in a processing system and more particularly to managing object types for data objects defined externally to the system.
In an object-oriented system, objects belong to object-classes that describe the data and the behavior common to all objects within the object-class. When an object is xe2x80x9cchecked-inxe2x80x9d to a system and later xe2x80x9cchecked-outxe2x80x9d of the system, the object-class is expected to be the same.
There are two conventional systems for receiving an object externally to the system and returning the object. Firstly, utilizing an object-oriented database; and secondly, creating a different table for each user-defined object-class in a Relational database.
Utilizing an object-oriented database is one way of introducing and retrieving objects. There are some problems with using object-oriented databases. First, object-oriented databases do not have the industry presence that Relational databases do. Second, object-oriented databases are not tuned for graph engine work. Oftentimes an object-oriented database is a complex solution for a simple problem.
Although creating a different table for each user-defined object-class can be performed, it has some disadvantages. First, backup and recovery management becomes more difficult. Second, database enforced referential integrity is sometimes not possible. Example: if an object is dependent upon a second object that is in one of a multitude of user-defined objects-classes, referential integrity does not allow a child table to be dependent on one of many potential parent tables. Finally, there is a greater variation between systems. Each installation of the system xe2x80x9cgrowsxe2x80x9d differently. Different objects are introduced to each system, thus different tables are created in each system. The same objects may be introduced in a different order in each system, thus tables containing the same information would be identified differently.
Accordingly, what is needed is a system and method for managing object types that are defined externally to the system that overcome the above-identified problems. The present invention addresses such a need.
A method and system for managing object types for objects which are defined externally to a system is disclosed. In a first aspect, the method and system comprises recording a relationship of a system-defined super-class to a user-defined subclass and then recording a relationship of an object to the user-defined subclass. A plurality of tables are utilized to record the relationship and the system defined super-class.
In a second aspect, a method and system for receiving an externally generated object comprises determining that the externally generated object is represented as an object class in one of a base table and a derived table. The method and system further includes obtaining a system-defined super-class of the object. The method and system further includes inserting an object class of the object into the derived table with an identifier of the system-defined super-class and a derived table identifier to create a relationship of a system-defined super-class to a user-defined subclass. The method and system further includes inserting an object and its unique identifier into an objects table, thus creating an accepted object.
In a third aspect, a method and system for sending an externally generated object by a system comprises receiving a request, for the object. The request includes a tag. The method and system also includes obtaining information based upon the tag from an object table to provide the object in an appropriate format.